# myapp/models.py

from django.contrib.auth.models import AbstractUser
from django.db import models
from rest_framework import serializers

class CustomUser(AbstractUser):
    # 你可以在这里添加额外的字段，例如 email, phone 等
    email = models.EmailField(unique=True)
    phone = models.CharField(max_length=15, blank=True, null=True)

    def __str__(self):
        return self.username